import sys


class Solution:
    def check(self, lines):
        for i in range(0, len(lines)-1):
            for j in range(i+1, len(lines)):
                if self.isIncluded(lines[i], lines[j]):
                    return True
        return False

    def isIncluded(self, line_1, line_2):
        if line_1[0] <= line_2[0] and line_1[1] >= line_2[1]:
            return True
        elif line_2[0] <= line_1[0] and line_2[1] >= line_1[1]:
            return True
        else:
            return False


if __name__ == '__main__':
    n = int(sys.stdin.readline().strip())
    lines = []
    for _ in range(n):
        line = sys.stdin.readline().strip()
        line = list(map(int, line.split(' ')))
        lines.append(line)

    # print(lines)
    s = Solution()
    if s.check(lines):
        print('true')
    else:
        print('false')
